//    uniCenta oPOS - touch friendly EPoS
//    Copyright (c) 2009 uniCenta
//    http://www.unicenta.net
//
//    This file is part of uniCenta oPOS
//
//    uniCenta oPOS is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    uniCenta oPOS is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with uniCenta oPOS.  If not, see <http://www.gnu.org/licenses/>.

report = new com.openbravo.pos.reports.PanelReportBean();

report.setTitleKey("Menu.PaymentReport");
report.setReport("/com/openbravo/reports/paymentreport");
report.setResourceBundle("com/openbravo/reports/paymentreport_messages");

report.setSentence("SELECT RECEIPTS.DATENEW,PAYMENTS.PAYMENT, PAYMENTS.TOTAL "+
"FROM PAYMENTS,RECEIPTS "+
"WHERE PAYMENTS.RECEIPT = RECEIPTS.ID AND PAYMENTS.TOTAL <0 AND ?(QBF_FILTER)"+
" ORDER BY RECEIPTS.DATENEW");
report.addParameter("RECEIPTS.DATENEW");
report.addParameter("RECEIPTS.DATENEW");
//report.addParameter("PAYMENTS.PAYMENT");
paramdates = new com.openbravo.pos.reports.JParamsDatesInterval();
paramdates.setEndDate(com.openbravo.beans.DateUtils.getToday());
report.addQBFFilter(paramdates);

report.addField("DATENEW", com.openbravo.data.loader.Datas.TIMESTAMP);
report.addField("PAYMENT", com.openbravo.data.loader.Datas.STRING);
report.addField("TOTAL", com.openbravo.data.loader.Datas.DOUBLE);

report;
